<?xml version='1.0' encoding='UTF-8' ?>
<!--
    Document   : menu
    Created on : Apr 13, 2011, 11:17:49 AM
    Author     : EaDeveloper
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:c="http://java.sun.com/jsp/jstl/core"
                 xmlns:pou="http://primefaces.org/ui">
    <style>
        .menu{ width: 200px; }
        .dock{ height: 100px;}
    </style>    
    <!-- ${facesContext.externalContext.requestContextPath} -->
    <!-- ${formUsuario.loged} -->

    <h:panelGroup rendered="#{formUsuario.loged}">
        <pou:panel style="width:100%;">
            <f:facet name="header">
                MI Credits                 
            </f:facet>
            <h:panelGrid style="width: 100%;">
                <h:panelGrid columns="3">
                    <h:outputLabel for="filtroMes" value="Mes" />
                    <pou:selectOneMenu id="filtroMes" value="#{mbSummary.mesSeleccionado}" effect="fade" >
                        <f:selectItems value="#{mbSummary.listadoMeses}" var="mes" itemLabel="#{mes.nombreMes}" itemValue="#{mes.numeroMes}"/>                        
                    </pou:selectOneMenu>
                    <pou:commandButton value="Filtrar" update="datos" id="submitFiltro" actionListener="#{mbSummary.submitFiltro()}" />  
                </h:panelGrid>                    
                <h:panelGroup>
                    <pou:dataTable id="datos" var="fila" value="#{mbSummary.filas}">
                        <pou:columns var="col" value="#{mbSummary.columnas}">
                            <f:facet name="header">
                                #{col.header}
                            </f:facet>
                            #{fila[col.index].valor}
                        </pou:columns>
                    </pou:dataTable>
                </h:panelGroup>
            </h:panelGrid>
        </pou:panel>
    </h:panelGroup>

</ui:composition>
